using System;
using Wilson.ORMapper;

namespace Touchmax
{
	public class BoClientContact : IObjectHelper, IObjectNotification
	{
		private int employeeId;
		private int companyId;
		private string fullName;
		private string firstName;
		private string middleName;
		private string lastName;
		private string jobTitle;
		private string department;
		private string tel;
		private string fax;
		private string mobile;
		private string email;
		private string remark;

		public int EmployeeId
		{
			get { return this.employeeId; }
		}

		public int CompanyId
		{
			get { return this.companyId; }
			set { this.companyId = value; }
		}

		public string FullName
		{
			get { return this.fullName; }
			set { this.fullName = value; }
		}

		public string FirstName
		{
			get { return this.firstName; }
			set { this.firstName = value; }
		}

		public string MiddleName
		{
			get { return this.middleName; }
			set { this.middleName = value; }
		}

		public string LastName
		{
			get { return this.lastName; }
			set { this.lastName = value; }
		}

		public string JobTitle
		{
			get { return this.jobTitle; }
			set { this.jobTitle = value; }
		}

		public string Department
		{
			get { return this.department; }
			set { this.department = value; }
		}

		public string Tel
		{
			get { return this.tel; }
			set { this.tel = value; }
		}

		public string Fax
		{
			get { return this.fax; }
			set { this.fax = value; }
		}

		public string Mobile
		{
			get { return this.mobile; }
			set { this.mobile = value; }
		}

		public string Email
		{
			get { return this.email; }
			set { this.email = value; }
		}

		public string Remark
		{
			get { return this.remark; }
			set { this.remark = value; }
		}

		#region IObjectHelper Members
		public object this[string memberName]
		{
			get {
				switch (memberName) {
					case "employeeId": return this.employeeId;
					case "companyId": return this.companyId;
					case "fullName": return this.fullName;
					case "firstName": return this.firstName;
					case "middleName": return this.middleName;
					case "lastName": return this.lastName;
					case "jobTitle": return this.jobTitle;
					case "department": return this.department;
					case "tel": return this.tel;
					case "fax": return this.fax;
					case "mobile": return this.mobile;
					case "email": return this.email;
					case "remark": return this.remark;
					default: throw new Exception("Invalid Member");
				}
			}
			set {
				switch (memberName) {
					case "employeeId": this.employeeId = (int) value; break;
					case "companyId": this.companyId = (int) value; break;
					case "fullName": this.fullName = (string) value; break;
					case "firstName": this.firstName = (string) value; break;
					case "middleName": this.middleName = (string) value; break;
					case "lastName": this.lastName = (string) value; break;
					case "jobTitle": this.jobTitle = (string) value; break;
					case "department": this.department = (string) value; break;
					case "tel": this.tel = (string) value; break;
					case "fax": this.fax = (string) value; break;
					case "mobile": this.mobile = (string) value; break;
					case "email": this.email = (string) value; break;
					case "remark": this.remark = (string) value; break;
					default: throw new Exception("Invalid Member");
				}
			}
		}
		#endregion

		#region IObjectNotification Members
		public void OnCreated(Transaction transaction)
		{
			// TODO
		}

		public void OnCreating(Transaction transaction)
		{
			// TODO
		}

		public void OnDeleted(Transaction transaction)
		{
			// TODO
		}

		public void OnDeleting(Transaction transaction)
		{
			// TODO
		}

		public void OnMaterialized(System.Data.IDataRecord dataRecord)
		{
			// TODO
		}

		public void OnPersistError(Transaction transaction, Exception exception)
		{
			// TODO
		}

		public void OnUpdated(Transaction transaction)
		{
			// TODO
		}

		public void OnUpdating(Transaction transaction)
		{
			// TODO
		}
		#endregion
	}
}
